# Maintainer: Ryuta Suzuki <oroppas@gmail.com>

_realname=networkx
pkgbase=mingw-w64-python3-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=2.4
pkgrel=1
pkgdesc="High-productivity software for complex networks (mingw-w64)"
arch=('any')
license=('BSD')
url="https://github.com/networkx/networkx"
depends=("${MINGW_PACKAGE_PREFIX}-python3"
         "${MINGW_PACKAGE_PREFIX}-python3-decorator")
optdepends=("${MINGW_PACKAGE_PREFIX}-python3-numpy"
            "${MINGW_PACKAGE_PREFIX}-python3-scipy"
            "${MINGW_PACKAGE_PREFIX}-python3-pyparsing"
            "${MINGW_PACKAGE_PREFIX}-python3-yaml")
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose")
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/networkx/networkx/archive/${_realname}-${pkgver}.tar.gz")
sha256sums=('1ecd52964d0923932ac7ebbb1d414c27aadac0414f424203b38d633f7faa1f2c')


build() {
  cd ${srcdir}/${_realname}-${_realname}-${pkgver}
  ${MINGW_PREFIX}/bin/python3 setup.py build
}

check() {
  cd ${srcdir}/${_realname}-${_realname}-${pkgver}
  ${MINGW_PREFIX}/bin/nosetests3
}

package() {
  cd ${srcdir}/${_realname}-${_realname}-${pkgver}
  MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
  ${MINGW_PREFIX}/bin/python3 setup.py install --root=${pkgdir} --prefix=${MINGW_PREFIX} --optimize=1 --skip-build
  install -D -m644 LICENSE.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE
}

# vim:set ts=2 sw=2 et:
